﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Demo
{
    public partial class DemoDateTimePicker : Form
    {
        public DemoDateTimePicker()
        {
            InitializeComponent();
        }

        private void DemoDateTimePicker_Load(object sender, EventArgs e)
        {
            dateTimePicker1.Value = DateTime.Today.AddDays(-14);
            monthCalendar1.AddBoldedDate(DateTime.Today.AddDays(7));
            monthCalendar1.AddMonthlyBoldedDate(new DateTime(2000, 8, 13));

            monthCalendar1.Update();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            label1.Text = dateTimePicker1.Value.ToString("dd/MM/yyyy");
        }

        private void monthCalendar1_DateChanged(object sender, DateRangeEventArgs e)
        {
            label1.Text = monthCalendar1.SelectionStart.ToString();
        }
    }
}
